public class test{
    public static void main(String[] args){
        Super s = new Sub();
        s.show();
    }
}

class Super{
    
    public int size = 10;
    
    static{
        System.out.println("我是父类静态代码块");
    }
    
    {
        System.out.println("我是父类构造代码块");
        show();
    }
    
    public Super(){
        System.out.println("我是父类的构造方法");
        show();
    }    
    
    public void show(){
        System.out.println("我是父类的show()");
        System.out.println(size);
    }
}

class Sub extends Super{
    
    public int size = 9;
    
    static{
        System.out.println("我是子类的静态代码块");
    }
    
    {
        System.out.println("我是子类的构造代码块");
        show();        
    }
    
    public Sub(){
        System.out.println("我是子类的构造方法");
    }
    
    public void show(){
        System.out.println("我是子类的show()");
        System.out.println(size);
    }
    
}